package com.telecom.weixi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import com.jxs.android.weixi.MyWork_UserDetail_Laucher_UserDetian_Laucher;

public class DirectTo extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		if (null != getIntent() && null != getIntent().getExtras()) {
			Bundle bundle = getIntent().getExtras();
			WeixiApplication.getApplication().setUserId(bundle.getString("mUserId"));
			WeixiApplication.getApplication().setLatnId(bundle.getString("mLatnId"));
			WeixiApplication.getApplication().setPasswd(bundle.getString("passwd"));
			WeixiApplication.getApplication().setTicket(bundle.getString("ticket"));
			WeixiApplication.WSDL_URL = bundle.getString("url");
			WeixiApplication.WSDL_NAME_SPACE = bundle.getString("namespace");

			String activity = bundle.getString("activity");
			if ("ShareActivity".equals(activity)) {
				startActivity(new Intent(this, ShareActivity.class));
			} else if ("SuggustActivity".equals(activity)) {
				startActivity(new Intent(this, SuggustActivity.class));
			} else if ("AboutMeActivity".equals(activity)) {
				startActivity(new Intent(this, AboutMeActivity.class));
			} else if ("SetPatternActivity".equals(activity)) {
				startActivity(new Intent(this, SetPatternActivity.class));
			} else if ("DataSearchActivity".equals(activity)) {
				startActivity(new Intent(this, TopMenuActivity.class));
			} else if ("New1Activity".equals(activity)) {
				Intent intent = new Intent(this, New1Activity.class);
				intent.putExtra(New1Activity.TAG_SERV_ID, bundle.getString("serv_id"));
				intent.putExtra(New1Activity.TAG_CUST_ID, bundle.getString("cust_id"));
				intent.putExtra(New1Activity.TAG_CUST_NBR, bundle.getString("cust_nbr"));
				intent.putExtra("hindTitle", false);
				startActivityForResult(intent, WeixiApplication.CODE_REQ);
			} else if ("MyWork_UserDetail_Laucher_UserDetian_Laucher".equals(activity)) {
				Intent intent = new Intent(this, MyWork_UserDetail_Laucher_UserDetian_Laucher.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
			finish();
		}
	}
}
